import { getUserList } from '@/api/system/system-user'

import { defineStore } from 'pinia'

const useUserSearch = defineStore('user', {
  state: () => ({
    userName: '',
    depName: '',
    list: [] as any,
    total: 0,
  }),

  actions: {
    async searchInfoDetail(tablePage: any, tableSize: any) {
      const res = await getUserList({
        depName: this.depName,
        username: this.userName,
        size: tableSize,
        page: tablePage,
      })
      console.log(res, '111111')
      this.list = res.data.list
      this.total = res.data.total
    },
  },
})
export default useUserSearch
